#!/usr/bin/python
# -*- coding: utf-8 -*-

#为方便以后移植，参数中的 key 一律为字符串格式
import logging
from google.appengine.ext import db
from google.appengine.api import memcache 
from google.appengine.api import users

import googledatabase
import getcounter
import commonfunction
import databasefunction



#添加一个邀请
def AddOneInvite(EmailList, MyName, SendContent):
    LoginName = commonfunction.GetUserLoginName()
    if 1 > len(EmailList) or 1 > len(LoginName):
        return

    NewInvite = googledatabase.CInviteTable()
    NewInvite.FriendEmail = EmailList
    NewInvite.LoginName = LoginName
    NewInvite.MyName = MyName
    NewInvite.Content = SendContent
        
    NewInvite.put()
